Skip to content

Go. Maps support #2114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 10, 2023
Merged

Go. Maps support #2114

merged 6 commits into from
Apr 10, 2023

Conversation

egiptipavel
Copy link
Collaborator

Description

  • Deleted RawValue method checkIsEqualTypes
  • Refactored the Go code
  • Added logging of the number of function executions
  • Added support for maps

How to test

Manual tests

type Structure struct {
	int
	int8
	int16
	int32
	int64
	uint
	uint8
	uint16
	uint32
	uint64
	uintptr
	float32
	float64
	complex64
	complex128
	byte
	rune
	string
	bool
}

type Type byte

type NA [5]uintptr

type NS []int

func Map(table map[string]int) map[string]int {
	return table
}

func MapOfStructures(table map[Structure]Structure) map[Structure]Structure {
	return table
}

func MapOfSliceOfInt(table map[string][]int) map[string][]int {
	return table
}

func MapOfNamedType(table map[int]Type) map[int]Type {
	return table
}

func MapOfNamedSlice(table map[uint]NS) map[uint]NS {
	return table
}

type NM map[string]NA

func NamedMap(n NM) NM {
	return n
}

Self-check list

Check off the item if the statement is true. Hint: [x] is a marked item.

Please do not delete the list or its items.

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

@egiptipavel egiptipavel added ctg-enhancement New feature, improvement or change request lang-go Issue is related to Go support labels Apr 9, 2023
@egiptipavel egiptipavel requested a review from Markoutte April 9, 2023 11:20
@egiptipavel egiptipavel self-assigned this Apr 9, 2023
@egiptipavel egiptipavel merged commit cbc4829 into main Apr 10, 2023
@egiptipavel egiptipavel deleted the egiptipavel/go-maps-support branch April 10, 2023 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ctg-enhancement New feature, improvement or change request lang-go Issue is related to Go support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants